package com.kenans.service.impl;

import com.kenans.dao.CityDao;
import com.kenans.entity.City;
import com.kenans.service.CityService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author KENANS
 * @date 2020-8-26 17:43
 * @Version 1.0
 */
@Service
public class CityServiceImpl implements CityService {
    @Autowired
    private CityDao cityDao;

    @Override
    public List<City> findAllByPid(Integer pid) {
        List<City> cities = cityDao.findAllByPid(pid);
        return cities;
    }

    @Override
    public City findById(Integer id) {
        City city = cityDao.findById(id);
        return city;
    }
}
